package com.wondersgroup.util;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;


/**
 * 初始化公钥、私钥
 * 
 * @author liujianzhuo
 *
 */
@Component
public class InitKey implements ApplicationListener<ContextRefreshedEvent>{
	
	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		try {
			new RsaUtil();
			System.out.println("初始化生成RSA非对称密钥...");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	

}
